package cn.yunyichina.provider.pay.wechat.test;

import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.provider.pay.wechat.service.WechatDownloadService;
import cn.yunyichina.utils.convert.JsonUtils;
import com.alibaba.fastjson.JSON;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Joe.zhou on 2018/1/15.
 */
public class WechatDownloadCheckAccountFile {

    @Test
    public void test() {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        WechatDownloadService wechat = context.getBean(WechatDownloadService.class);
        String json = "";
        Map<String , String> map = new HashMap<String,String>();
        map.put("org_name" ,"汕头大学医学院第一附属医院");
        map.put("org_id" ,"c5bd9f47acbc11e6990400163e0042e6");
        map.put("mch_id" ,"1427399002");
        map.put("app_id" ,"wx8d06256bd3e86fa8");
        map.put("pay_key" ,"1p2485gvbs8ebcawjo6o3ymrbhez75xn");
        map.put("date" ,"2018-01-14");
        Response response = wechat.getWechatDownloadBillFile(JsonUtils.toJsonString(map));
        System.out.println("response:" + JSON.toJSONString(response));
    }
}
